from fastapi import FastAPI
from fastapi.responses import FileResponse
from Spider.SpiderBook import bookDataSpider

app = FastAPI()

@app.get("/")
async def root():
    return FileResponse("static/index.html")

@app.get("/book")
async def get_book_data(num: int):
    return bookDataSpider().ParseHtml(num)
